[iPhone app] Detecting which key has been pressed in UITextField

Posted by Dough on Stack Overflow See other posts from Stack Overflow or by Dough
Published on 2010-06-16T13:26:27Z Indexed on 2010/06/16 13:32 UTC
Read the original article Hit count: 240

Hi,

I have an UITextField object in my view and want to launch a method when user press backspace button and textField is empty.

First I have to do is to create a cursor storing text length, so when cursor changes from 1 to 0 there is nothing to do.

The only way to launch the method is when text length is 0 -> press backspace -> remain to 0.

How to catch the event of pressing the backspace key in my UITextField ?

Thanks in advance !

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c